from typing import List
class Solution:
    def findLengthOfLCIS(self, nums: List[int]) -> int:
        #定义dp数组
        l = len(nums)
        dp = [1 for i in nums]
        for i in range(1,l):
            for j in range(i):
                if nums[i] > nums[j]:
                    dp[i] = max(dp[j]+1,dp[i])
        return max(dp)




if __name__ == '__main__':
    nums = [1,3,5,4,7]
    solution = Solution()
    val = solution.findLengthOfLCIS(nums)
    print(val)
